home *** CD-ROM | disk | FTP | other *** search
- package com.sun.java.swing.text;
-
- import java.io.IOException;
- import java.io.ObjectInputStream;
- import java.io.ObjectOutputStream;
-
- public class AbstractDocument$LeafElement extends AbstractDocument.AbstractElement {
- // $FF: synthetic field
- AbstractDocument this$0;
- // $FF: renamed from: p0 com.sun.java.swing.text.Position
- private transient Position field_0;
- // $FF: renamed from: p1 com.sun.java.swing.text.Position
- private transient Position field_1;
-
- // $FF: synthetic method
- public AbstractDocument$LeafElement(AbstractDocument this$0, Element parent, AttributeSet a, int offs0, int offs1) {
- super(this$0, parent, a);
- this.this$0 = this$0;
-
- try {
- this.field_0 = this$0.createPosition(offs0);
- this.field_1 = this$0.createPosition(offs1);
- } catch (BadLocationException var6) {
- this.field_0 = null;
- this.field_1 = null;
- throw new StateInvariantError("Can't create Position references");
- }
- }
-
- public String toString() {
- return "LeafElement(" + this.getName() + ") " + this.field_0 + "," + this.field_1 + "\n";
- }
-
- public int getStartOffset() {
- return this.field_0.getOffset();
- }
-
- public int getEndOffset() {
- return this.field_1.getOffset();
- }
-
- public String getName() {
- String nm = super.getName();
- if (nm == null) {
- nm = "content";
- }
-
- return nm;
- }
-
- public int getElementIndex(int pos) {
- return -1;
- }
-
- public Element getElement(int index) {
- return null;
- }
-
- public int getElementCount() {
- return 0;
- }
-
- public boolean isLeaf() {
- return true;
- }
-
- private void writeObject(ObjectOutputStream s) throws IOException {
- s.defaultWriteObject();
- s.writeInt(this.field_0.getOffset());
- s.writeInt(this.field_1.getOffset());
- }
-
- private void readObject(ObjectInputStream s) throws ClassNotFoundException, IOException {
- s.defaultReadObject();
- int off0 = s.readInt();
- int off1 = s.readInt();
-
- try {
- this.field_0 = this.this$0.createPosition(off0);
- this.field_1 = this.this$0.createPosition(off1);
- } catch (BadLocationException var4) {
- this.field_0 = null;
- this.field_1 = null;
- throw new IOException("Can't restore Position references");
- }
- }
- }
-